from abc import ABC, abstractmethod


class IMapAccess(ABC):
    def __init__(self, deserializer):
        self.__deserializer = deserializer

    def deserializer(self):
        return self.__deserializer


    @abstractmethod
    def has_next_entry(self):
        pass

    def next_entry(self, key_type=None, value_type=None):
        key = self._next_key(key_type)
        return (key, self._next_value(value_type)) if key is not None else (None, None)

    @abstractmethod
    def _next_key(self, type_hint):
        pass

    @abstractmethod
    def _next_value(self, type_hint):
        pass

